<style>
    #ingboy{
        font-size: 14px;
        width: 55%;
        height:620px;
        float: left;
    }
    #storedetail{
        line-height: 36px;
        padding-left: 20px;
        padding-bottom: 10px;
    }
    #bf{
        background-color: #eee;
        text-align: right;
        width: 150px;
    }
    #cf{
        width: 200px;
    }
</style>

<div id="ingboy">
    <div id='storedetail'>
        待办事件信息
        <table width="720" border="1" cellpadding="0" cellspacing="0">
            <tr>
              <td id='bf'>发起人：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->backlogItem->Operator; ?></td>
              <td id='bf'>发起时间：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->backlogItem->DateCreated;?></td>
            </tr>
            <tr>
              <td id='bf'>状态：</td>
              <td id='cf' style="color:red;font-size:16px;font-weight:900;">&nbsp;&nbsp;<?php echo $this->backlogItem->StatusName;?></td>
              <td id='bf'>来源：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->backlogItem->SourceName;echo $this->backlogItem->SourceId?"（".$this->backlogItem->SourceUrl."）":"";?></td>
            </tr>
            <tr>
              <td id='bf'>处理人：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->backlogItem->SolveUserName; ?></td>
              <td id='bf'>处理时间：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->backlogItem->solveDay;?>天</td>
            </tr>
            <tr>
              <td id='bf'>事件内容：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->backlogItem->Content;?></td>
            </tr>
            <tr>
              <td id='bf'>处理方案：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->backlogItem->Comment?$this->backlogItem->Comment:"暂无";?></td>
            </tr>
            <tr>
              <td id='bf'>知会人：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->backlogItem->KnowUserAllName;?></td>
            </tr>
        </table>
    </div>
    <?php if($this->backlogItem->status > Application_Model_Backlog::STATUS_default){ ?>
    <div id='storedetail'>
        待办事件处理信息
        <table width="720" border="1" cellpadding="0" cellspacing="0">
            <?php foreach ($this->solveLog as $solveVal) { ?>
            <tr>
              <td id='bf'><?php echo $solveVal->Operator."：<br>(".$solveVal->DateCreated.")";?></td>
              <td id='cf'  colspan="3">&nbsp;&nbsp;<?php echo $solveVal->comment; ?></td>
            </tr>
            <?php } ?>
        </table>
    </div>
    <?php } ?>
    <div id='storedetail'>
        <?php if($this->backlogItem->Status != Application_Model_Backlog::STATUS_processed){ ?>
          <input type="button" id="editbacklog" naem="editbacklog" value="跟踪事件" style="background-color: #F60;width: 80px;height: 36px;color: white;font-size: 16px;border-radius:8px;"/>&nbsp;&nbsp;
        <?php } ?>
        &nbsp;&nbsp;<input type="button" id="delbacklog" naem="delbacklog" value="删除" style="background-color: #1668A4;width: 50px;height: 36px;color: white;font-size: 16px;border-radius:8px;"/>
        &nbsp;&nbsp;<input type="button" id="refo" naem="refo" value="返回" style="background-color: #1668A4;width: 50px;height: 36px;color: white;font-size: 16px;border-radius:8px;"/>
    </div>
</div>
<div class="tanchuang" style="display:none;">
    <div class="nui-msgbox">
        <div class="nui-msgbox-hd">跟踪事件</div>
        <a class="nui-msgbox-close" title="关闭" id="exitissue"><b></b></a>
    </div>
    <div class="neirbox">
        <form method="post" action="/admini/manageday/backlogdetail/id/<?php echo $this->backlogItem->id;?>" id="formbacklog">
            <table style="margin-top:20px;">
                <tr style="height:36px;">
                    <td align="right" style="width:100px">状态：</td>
                    <td>&nbsp;&nbsp;<input type="radio" id="status_1" name="status" class="status_radio" value="<?php echo Application_Model_Backlog::STATUS_dispose?>" checked/>&nbsp;处理中
                        &nbsp;&nbsp;<input type="radio" id="status_2" name="status" class="status_radio" value="<?php echo Application_Model_Backlog::STATUS_processed?>" />&nbsp;已处理</td>
                </tr>
                <tr>
                    <td  align="right">处理内容：</td>
                    <td>&nbsp;&nbsp;<textarea id="comment" name="comment" style=" width: 350px; height: 144px;"></textarea></td>
                </tr>
                <tr  style="height:36px;">
                    <td  align="right">移交处理人：</td>
                    <td>&nbsp;&nbsp;<select id="solveName" name="solveName" >
                        <?php foreach ($this->userAll as $userVal) { ?>
                                <option value="<?php echo $userVal->id;?>" <?php echo $userVal->id==$this->backlogItem->SolveName?"selected":"";?>><?php echo $userVal->nikename;?></option>
                        <?php }?></select></td>
                </tr>
            </table>
            <div class="neirboxok" style="margin-top: 20px;margin-left: 200px;">
                <input type="hidden" id="operate" name="operate" value="editbacklog" />
                <a class="anvbotton" href="javascript:void(0)" id="subbacklog"><span>确认提交</span></a>
            </div>  
        </form>
    </div>
</div>
<div class="houtai_overlay" style="display:none;"></div>
<script type="text/javascript">
    $("#refo").click(function(){
        history.back();
    });
    $("#delbacklog").click(function(){
       if(confirm("您确定删除该待办事件？","提示信息")){   
            $.ajax({
                 type: 'POST',
                 url: '/admini/manageday/delbacklog/id/<?php echo $this->backlogItem->id;?>',
                 success: function(data) {
                     if(data == 1){
                         alert("删除成功！");
                         location.href = "/admini/manageday/backlog/";
                     }
                 }
               });
       }
    });
    $("#subbacklog").click(function(){
        var comment = $("#comment").val();
        if(comment == ""){
            alert("处理内容不能为空");
            return ;
        }
        $('#formbacklog').submit();
    });
    $("#editbacklog").live("click",function(){
        $("div.houtai_overlay").attr("style","display:block;");
        $("div.tanchuang").attr("style","display:block;");
    });
    $("#exitissue").live("click",function(){
        $("div.houtai_overlay").attr("style","display:none;");
        $("div.tanchuang").attr("style","display:none;");
    });
</script>